import com.kis.core.scan.AutoScanServerBean;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

/**
 * Created by wongloong on 16-4-14.
 */
@SpringBootApplication
@ComponentScan("com.kis")
@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class})
@EnableDiscoveryClient
public class Main {


    public static void main(String[] args) {
        SpringApplication.run(Main.class, args);
    }

    @Bean
    public AutoScanServerBean initServer() {
        AutoScanServerBean scanServer = new AutoScanServerBean();
        scanServer.setBasePackage("com.kis.service");
        return scanServer;
    }
}
